ABSTRACT
Data is an important production factor in the era of digital economy. Privacy computing can ensure that data providers do not disclose sensitive data, carry out multi-party joint analysis and computation, securely and privately complete the full excavation of data value in the process of circulation, sharing, fusion, and calculation, which has become a popular research topic. String comparison is one of the common operations in data processing. To address the string comparison problem in multi-party scenarios, we propose an algorithm for secure string comparison based on outsourced computation. The algorithm encodes the strings with one hot encoding scheme and encrypts the encoded strings using an XOR homomorphic encryption scheme. The proposed algorithm achieves efficient and secure string comparison and counts the number of different characters with the help of a cloud-assisted server. The proposed scheme is implemented and verified using the new coronavirus gene sequence as the comparison string, and the performance is compared with that of a state-of-the-art security framework. Experiments show that the proposed algorithm can effectively improve the string comparison speed and obtain correct comparison results without compromising data privacy. © 2023, The Author(s), under exclusive license to Springer Nature Switzerland AG.